#!/bin/sh

# event [--debug] KEY
# 
# KEY: install(pull) remove update push start exit reset archive extract compile clear
# maybe don't add: found(for local search)

# or /dev/stdout
log=/dev/null
arg=$1

if [[ --debug == $arg ]] ; then
	log=~/.local/badbro/log/bbpm.log
	arg=$2
fi

_time () {
	date "+[%F %T] "
}

_log () {
	reson=$1
	commit=$2
	echo `_time` "$reson:" $commit >>$log
}


if [[ "install" == $arg ]] ; then
	#
	_log "info" "install package"
elif [[ "remove" == $arg ]] ; then
	# 
	
	_log "info" "remove package"

elif [[ "update" == $arg ]] ; then
	# 
	
	_log "info" "update package"

elif [[ "start" == $arg ]] ; then
	# 
	
	_log "info" "start package"

elif [[ "exit" == $arg ]] ; then
	# 

	_log "info" "exit package"

elif [[ "reset" == $arg ]] ; then
	# 

	_log "info" "reset package"

elif [[ "clear" == $arg ]] ; then
	# 

	_log "info" "clear package"
fi
